# $Id$
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: damir <damir@archlinux.org>

pkgname=mpfr
_pkgver=3.1.5
_patchlevel=p2
pkgver=${_pkgver}.${_patchlevel}
#pkgver=${_pkgver}
pkgrel=1
pkgdesc="Multiple-precision floating-point library"
arch=('i686' 'x86_64')
url="http://www.mpfr.org/"
license=('LGPL')
depends=('gmp>=5.0')
source=(http://www.mpfr.org/mpfr-current/mpfr-${_pkgver}.tar.xz{,.asc}
        mpfr-${_pkgver}-${_patchlevel}.patch)
md5sums=('c4ac246cf9795a4491e7766002cd528f'
         'SKIP'
         'f388b7983bf69e2bfd3216426c89954c')
validpgpkeys=('07F3DBBECC1A39605078094D980C197698C3739D')

prepare() {
  cd "${srcdir}/${pkgname}-${_pkgver}"
  patch -p1 -i $srcdir/mpfr-${_pkgver}-${_patchlevel}.patch
}

build() {
  cd "${srcdir}/${pkgname}-${_pkgver}"
  ./configure --prefix=/usr --enable-thread-safe --enable-shared
  make
}

check() {
  cd "${srcdir}/${pkgname}-${_pkgver}"
  make check
}

package() {
  cd "${srcdir}/${pkgname}-${_pkgver}"
  make DESTDIR="${pkgdir}" install
}
